<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>OpenSubMenu</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">OpenSubMenu()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#006666"><b>OpenSubMenu</b></font>(Text$ [, ImageID])  </blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Creates an empty submenu in the current menu. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Text$</i></td>
<td width="90%"> 
 
The text for the submenu. 
<br>
<br>
<b>Windows:</b> 
<br>
In the Text$ argument, you can use the special '&amp;' character to underline a specific letter: 
"&amp;File" will actually display: <u>F</u>ile 

 

</td></tr>
<tr><td><i>ImageID (optional)</i></td>
<td> 
 
An optional image to display next to the submenu. This parameter only has an effect 
if the current menu was created using the <a href="createimagemenu.html">CreateImageMenu()</a> or <a href="createpopupimagemenu.html">CreatePopupImageMenu()</a> command. 
This value can be obtained using the <a href="../image/imageid.html">ImageID()</a> function. 

 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

None.





</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">If</font></b> <font color="#006666">OpenWindow</font>(0, 200, 200, 220, 100, "SubMenu Example")
    <b><font color="#006666">If</font></b> <font color="#006666">CreateMenu</font>(0,<font color="#006666"> WindowID</font>(0))
<font color="#006666">      MenuTitle</font>("Project") 
<font color="#006666">        MenuItem</font>(1, "Open")  
<font color="#006666">        MenuItem</font>(2, "Close")
<font color="#006666">        MenuBar</font>()
<font color="#006666">        OpenSubMenu</font>("Recent files")       <font color="#006666">; begin submenu</font>
<font color="#006666">          MenuItem</font>( 3, "C:\Autoexec.bat")
<font color="#006666">          MenuItem</font>( 4, "D:\Test.txt")
<font color="#006666">        CloseSubMenu</font>()                    <font color="#006666">; end submenu</font>
    <b><font color="#006666">EndIf</font></b>
    <b><font color="#006666">Repeat</font></b> : <b><font color="#006666">Until</font></b> <font color="#006666">WaitWindowEvent</font>()=<font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#006666">EndIf</font></b>
</font></pre>

<p><img src="../HelpPictures/opensubmenu.png"></p>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="closesubmenu.html">CloseSubMenu()</a>, <a href="menutitle.html">MenuTitle()</a>, <a href="menuitem.html">MenuItem()</a>, <a href="menubar.html">MenuBar()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=menutitle.html>MenuTitle()</a> - <a href=index.html>Menu Index</a> - <a href=setmenuitemstate.html>SetMenuItemState()</a> -&gt;



</body></html>